<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>TF.js 图片物件识别</title>
  <style>
    .result {
      height: 400px;
      display: flex;
      flex-direction: row;
      margin-top: 10px;
    }
    .result div {
      flex: 1;
      border: 1px solid #ccc;
      overflow: hidden;
    }
    #image {
      max-width: 100%;
      max-height: 100%;
    }
    .image-wrapper,
    .canvas-wrapper {
      display: flex;
      align-items: center;
      justify-content: center;
    }
  </style>
</head>

<body>
  <h1>TF.js 图片物件识别</h1>
  <input type="file" id="uploadBtn"></input>
  <button type="button" id="run">运行</button>
  <div class="result">
    <div class="image-wrapper">
      <img id="image" />
    </div>
    <div class="canvas-wrapper">
      <canvas id="canvas"></canvas>
    </div>
  </div>
</body>

<script src="index.js"></script>

</html>
